<?php
/**
 * Created by PhpStorm.
 * User: fangwei
 * Date: 2019-06-26
 * Time: 22:40
 */

namespace App\Http\Requests\Admin;


use Illuminate\Foundation\Http\FormRequest;

class RolePermissionInputDTO extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'permissions' => 'array',
            'permissions.*' => 'integer',
        ];
    }

    public function messages()
    {
        return [
            'permissions.array' => '菜单栏目参数错误',
            'permissions.*.integer' => '菜单栏目参数错误',
        ];
    }
}